package com.eazyshop.goods.dao;

import com.eazyshop.goods.pojo.Brand;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface BrandMapper extends Mapper<Brand> {

    @Select("SELECT  tb.* FROM tb_category tc INNER JOIN tb_category_brand tcb ON tc.`id`=tcb.`category_id`INNER JOIN tb_brand tb ON tcb.`brand_id`=tb.`id` WHERE tc.`name`=#{categoryName}")
    List<Map> findBrandListByCategoryName(@Param("categoryName") String categoryName);
}
